[Commits] Rev 4146: MDEV-6067: Partitioned table DML sometimes binlogged without XID event in http://bazaar.launchpad.net/~maria-captains/maria/10.0

knielsen at knielsen-hq.org knielsen at knielsen-hq.org
Fri Apr 11 10:11:40 EEST 2014


At http://bazaar.launchpad.net/~maria-captains/maria/10.0

------------------------------------------------------------
revno: 4146
revision-id: knielsen at knielsen-hq.org-20140411071140-xebtd0oxn0qg3gef
parent: knielsen at knielsen-hq.org-20140410073857-7laqshw8k7mjkq8b
committer: knielsen at knielsen-hq.org
branch nick: tmp-10.0
timestamp: Fri 2014-04-11 09:11:40 +0200
message:
  MDEV-6067: Partitioned table DML sometimes binlogged without XID event
  
  Temporary 10.0 patch for testing (same fix will be done in 5.2 and merged up).
=== modified file 'sql/handler.cc'
--- a/sql/handler.cc	2014-03-26 21:25:38 +0000
+++ b/sql/handler.cc	2014-04-11 07:11:40 +0000
@@ -3853,14 +3853,11 @@ int handler::ha_check(THD *thd, HA_CHECK
   if it is started.
 */
 
+inline
 void
-handler::mark_trx_read_write_part2()
+handler::mark_trx_read_write()
 {
   Ha_trx_info *ha_info= &ha_thd()->ha_data[ht->slot].ha_info[0];
-
-  /* Don't call this function again for this statement */
-  mark_trx_done= TRUE;
-
   /*
     When a storage engine method is called, the transaction must
     have been started, unless it's a DDL call, for which the

=== modified file 'sql/handler.h'
--- a/sql/handler.h	2014-03-28 07:31:24 +0000
+++ b/sql/handler.h	2014-04-11 07:11:40 +0000
@@ -2443,7 +2443,6 @@ class handler :public Sql_alloc
   FT_INFO *ft_handler;
   enum {NONE=0, INDEX, RND} inited;
   bool implicit_emptied;                /* Can be !=0 only if HEAP */
-  bool mark_trx_done;
   const COND *pushed_cond;
   /**
     next_insert_id is the next value which should be inserted into the
@@ -2524,7 +2523,7 @@ class handler :public Sql_alloc
     in_range_check_pushed_down(FALSE),
     ref_length(sizeof(my_off_t)),
     ft_handler(0), inited(NONE),
-    implicit_emptied(0), mark_trx_done(FALSE),
+    implicit_emptied(0),
     pushed_cond(0), next_insert_id(0), insert_id_for_cur_row(0),
     pushed_idx_cond(NULL),
     pushed_idx_cond_keyno(MAX_KEY),
@@ -2605,13 +2604,6 @@ class handler :public Sql_alloc
   }
   int ha_rnd_init_with_error(bool scan) __attribute__ ((warn_unused_result));
   int ha_reset();
-  /* Tell handler (not storage engine) this is start of a new statement */
-  void ha_start_of_new_statement()
-  {
-    ft_handler= 0;
-    mark_trx_done= FALSE;
-  }
-
   /* this is necessary in many places, e.g. in HANDLER command */
   int ha_index_or_rnd_end()
   {
@@ -3702,12 +3694,8 @@ class handler :public Sql_alloc
 
 private:
   /* Private helpers */
-  void mark_trx_read_write_part2();
-  inline void mark_trx_read_write()
-  {
-    if (!mark_trx_done)
-      mark_trx_read_write_part2();
-  }
+  inline void mark_trx_read_write();
+private:
   inline void increment_statistics(ulong SSV::*offset) const;
   inline void decrement_statistics(ulong SSV::*offset) const;
 

=== modified file 'sql/table.cc'
--- a/sql/table.cc	2014-03-27 22:23:28 +0000
+++ b/sql/table.cc	2014-04-11 07:11:40 +0000
@@ -3997,7 +3997,7 @@ void TABLE::init(THD *thd, TABLE_LIST *t
   status= STATUS_NO_RECORD;
   insert_values= 0;
   fulltext_searched= 0;
-  file->ha_start_of_new_statement();
+  file->ft_handler= 0;
   reginfo.impossible_range= 0;
   created= TRUE;
   cond_selectivity= 1.0;



More information about the commits mailing list