List:Commits« Previous MessageNext Message »
From:Frazer Clement Date:November 10 2011 12:48pm
Subject:bzr push into mysql-trunk-cluster branch (frazer.clement:3404 to 3405)
View as plain text  
 3405 Frazer Clement	2011-11-09
      Avoid problems with support for binlog-row-image
      
      The binlog-row-image option allows row events to be generated either
      as FULL, MINIMAL, or NOBLOB.  
      
      FULL causes all columns, not just those modified, to be logged in 
      each event AND it causes update and delete events to have full 
      BEFORE images.
      
      MINIMAL logs only modified columns, and update and delete events do
      not need before images if the table has a primary key.
      
      NOBLOB is similar to FULL, except unmodified BLOB columns are not 
      logged.
      
      The default value is FULL.
      
      The FULL option is implemented by setting all columns in the write
      set when performing an Insert, Update or Delete operation.
      
      The MINIMAL option avoids this, and records only the modified columns
      in the Binlog, and skips before images if not required.
      
      Ndb already supports similar functionality via the 
      --ndb-log-updated-only server option and per-table binlog flags.  This
      is implemented in trigger logic in the data nodes, and affects non-MySQLD
      sourced modifications as well.
      
      The part of the FULL implementation which causes operation's write
      sets to be fully set breaks the ndb implementation of ndb-log-updated-only
      as all columns are always written to.
      
      For this reason, the HTON_NO_BINLOG_ROW_OPT flag is set by Ndb to 
      avoid the FULL option having this effect.
      
      The FULL, MINIMAL or NOBLOB option still affects how the Ndb Binlog
      Injector records events, in conjuntion with --ndb-log-updated-only.
      The default value, FULL, behaves as it did prior to mysql-trunk-cluster.
      
      When MINIMAL is passed, Delete and Update events do not need to have
      before images, saving space in the Binlog.
      
      The --binlog-row-image option can be set per-server or per-session.
      The Ndb engine uses the per-server setting and ignores per-session
      settings. 
      
      This patch results in the following testcases passing :
      ndb_binlog_variants, ndb_rpl_conflict_max, 
      ndb_rpl_conflict_old, ndb_rpl_2innodb, ndb_rpl_basic, 
      ndb_rpl_idempotent, ndb_rpl_logging

    modified:
      sql/ha_ndbcluster.cc
 3404 magnus.blaudd@stripped	2011-11-02 [merge]
      Merge 5.5-cluster -> trunk-cluster

    added:
      sql/ndb_event_data.cc
      sql/ndb_event_data.h
      sql/ndb_schema_dist.cc
      sql/ndb_schema_dist.h
      sql/ndb_schema_object.cc
      sql/ndb_schema_object.h
    modified:
      mysql-test/include/mtr_warnings.sql
      mysql-test/suite/ndb/t/ndb_share.test
      sql/ha_ndb_index_stat.cc
      sql/ha_ndbcluster.cc
      sql/ha_ndbcluster.h
      sql/ha_ndbcluster_binlog.cc
      sql/ha_ndbcluster_binlog.h
      sql/ha_ndbcluster_tables.h
      sql/ndb_share.h
      sql/ndb_thd.cc
      sql/ndb_thd.h
      sql/ndb_thd_ndb.cc
      sql/ndb_thd_ndb.h
      storage/ndb/CMakeLists.txt
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc	2011-11-02 08:49:13 +0000
+++ b/sql/ha_ndbcluster.cc	2011-11-09 19:34:25 +0000
@@ -12531,7 +12531,8 @@ static int ndbcluster_init(void *p)
     h->fill_files_table= ndbcluster_fill_files_table;
 #endif
     ndbcluster_binlog_init_handlerton();
-    h->flags=            HTON_CAN_RECREATE | HTON_TEMPORARY_NOT_SUPPORTED;
+    h->flags=            HTON_CAN_RECREATE | HTON_TEMPORARY_NOT_SUPPORTED |
+      HTON_NO_BINLOG_ROW_OPT;
     h->discover=         ndbcluster_discover;
     h->find_files=       ndbcluster_find_files;
     h->table_exists_in_engine= ndbcluster_table_exists_in_engine;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-cluster branch (frazer.clement:3404 to 3405) Frazer Clement11 Nov