List:Commits« Previous MessageNext Message »
From:tomas Date:June 8 2007 8:22pm
Subject:bk commit into 5.1 tree (tomas:1.2527)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-06-08 22:22:20+02:00, tomas@stripped +9 -0
  WL#3867
  - code cleanup
  - more tests

  mysql-test/r/rpl_ndb_conflict.result@stripped, 2007-06-08 22:22:17+02:00, tomas@stripped +72 -0
    WL#3867
    - code cleanup
    - more tests

  mysql-test/r/rpl_ndb_logging.result@stripped, 2007-06-08 22:22:18+02:00, tomas@stripped +72 -0
    New BitKeeper file ``mysql-test/r/rpl_ndb_logging.result''

  mysql-test/r/rpl_ndb_logging.result@stripped, 2007-06-08 22:22:18+02:00, tomas@stripped +0 -0

  mysql-test/t/rpl_ndb_conflict.test@stripped, 2007-06-08 22:22:17+02:00, tomas@stripped +24 -5
    WL#3867
    - code cleanup
    - more tests

  mysql-test/t/rpl_ndb_logging.test@stripped, 2007-06-08 22:22:18+02:00, tomas@stripped +136 -0
    New BitKeeper file ``mysql-test/t/rpl_ndb_logging.test''

  mysql-test/t/rpl_ndb_logging.test@stripped, 2007-06-08 22:22:18+02:00, tomas@stripped +0 -0

  sql/ha_ndbcluster.cc@stripped, 2007-06-08 22:22:17+02:00, tomas@stripped +5 -4
    WL#3867
    - code cleanup
    - more tests

  sql/ha_ndbcluster.h@stripped, 2007-06-08 22:22:18+02:00, tomas@stripped +11 -5
    WL#3867
    - code cleanup
    - more tests

  sql/ha_ndbcluster_binlog.cc@stripped, 2007-06-08 22:22:18+02:00, tomas@stripped +37 -17
    WL#3867
    - code cleanup
    - more tests

  sql/ha_ndbcluster_tables.h@stripped, 2007-06-08 22:22:18+02:00, tomas@stripped +4 -4
    WL#3867
    - code cleanup
    - more tests

  sql/set_var.cc@stripped, 2007-06-08 22:22:18+02:00, tomas@stripped +3 -0
    WL#3867
    - code cleanup
    - more tests

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	tomas
# Host:	whalegate.ndb.mysql.com
# Root:	/home/tomas/mysql-5.1-wl3867

--- 1.477/sql/ha_ndbcluster.cc	2007-06-07 11:05:30 +02:00
+++ 1.478/sql/ha_ndbcluster.cc	2007-06-08 22:22:17 +02:00
@@ -6051,8 +6051,8 @@
 
     while (!IS_TMP_PREFIX(m_tabname))
     {
-      ndbcluster_read_binlog_replication(thd, ndb, share, m_table, ::server_id);
-
+      if (share)
+        ndbcluster_read_binlog_replication(thd, ndb, share, m_table, ::server_id);
       String event_name(INJECTOR_EVENT_LEN);
       ndb_rep_event_name(&event_name, m_dbname, m_tabname,
                          get_binlog_full(share));
@@ -6086,7 +6086,7 @@
         and (share && do_event_op)
       */
       if (share && !do_event_op)
-        share->flags|= NSF_NO_BINLOG;
+        set_binlog_nologging(share);
       ndbcluster_log_schema_op(thd, share,
                                thd->query, thd->query_length,
                                share->db, share->table_name,
@@ -6501,7 +6501,8 @@
     Ndb_table_guard ndbtab_g2(dict, new_tabname);
     const NDBTAB *ndbtab= ndbtab_g2.get_table();
 
-    ndbcluster_read_binlog_replication(current_thd, ndb, share, ndbtab, ::server_id);
+    if (share)
+      ndbcluster_read_binlog_replication(current_thd, ndb, share, ndbtab, ::server_id);
 
     /* always create an event for the table */
     String event_name(INJECTOR_EVENT_LEN);

--- 1.184/sql/ha_ndbcluster.h	2007-06-06 15:59:04 +02:00
+++ 1.185/sql/ha_ndbcluster.h	2007-06-08 22:22:18 +02:00
@@ -169,20 +169,26 @@
 
 #ifdef HAVE_NDB_BINLOG
 /* NDB_SHARE.flags */
-#define NSF_HIDDEN_PK 1 /* table has hidden primary key */
-#define NSF_BLOB_FLAG 2 /* table has blob attributes */
-#define NSF_NO_BINLOG 4 /* table should not be binlogged */
-#define NSF_BINLOG_FULL        8 /* table should be binlogged with full rows */
-#define NSF_BINLOG_USE_UPDATE 16  /* table update should be binlogged using
+#define NSF_HIDDEN_PK   1u /* table has hidden primary key */
+#define NSF_BLOB_FLAG   2u /* table has blob attributes */
+#define NSF_NO_BINLOG   4u /* table should not be binlogged */
+#define NSF_BINLOG_FULL 8u /* table should be binlogged with full rows */
+#define NSF_BINLOG_USE_UPDATE 16u  /* table update should be binlogged using
                                      update log event */
+inline void set_binlog_logging(NDB_SHARE *share)
+{ share->flags&= ~NSF_NO_BINLOG; }
 inline void set_binlog_nologging(NDB_SHARE *share)
 { share->flags|= NSF_NO_BINLOG; }
 inline my_bool get_binlog_nologging(NDB_SHARE *share)
 { return (share->flags & NSF_NO_BINLOG) != 0; }
+inline void set_binlog_updated_only(NDB_SHARE *share)
+{ share->flags&= ~NSF_BINLOG_FULL; }
 inline void set_binlog_full(NDB_SHARE *share)
 { share->flags|= NSF_BINLOG_FULL; }
 inline my_bool get_binlog_full(NDB_SHARE *share)
 { return (share->flags & NSF_BINLOG_FULL) != 0; }
+inline void set_binlog_use_write(NDB_SHARE *share)
+{ share->flags&= ~NSF_BINLOG_USE_UPDATE; }
 inline void set_binlog_use_update(NDB_SHARE *share)
 { share->flags|= NSF_BINLOG_USE_UPDATE; }
 inline my_bool get_binlog_use_update(NDB_SHARE *share)

--- 1.234/sql/set_var.cc	2007-06-01 08:52:12 +02:00
+++ 1.235/sql/set_var.cc	2007-06-08 22:22:18 +02:00
@@ -68,6 +68,7 @@
 extern ulong ndb_report_thresh_binlog_epoch_slip;
 extern ulong ndb_report_thresh_binlog_mem_usage;
 extern my_bool opt_ndb_log_update_as_write;
+extern my_bool opt_ndb_log_updated_only;
 #endif
 
 extern CHARSET_INFO *character_set_filesystem;
@@ -496,6 +497,8 @@
                                        &ndb_report_thresh_binlog_mem_usage);
 static sys_var_bool_ptr
 sys_ndb_log_update_as_write(&vars, "ndb_log_update_as_write", &opt_ndb_log_update_as_write);
+static sys_var_bool_ptr
+sys_ndb_log_updated_only(&vars, "ndb_log_updated_only", &opt_ndb_log_updated_only);
 #endif
 static sys_var_thd_bool
 sys_ndb_use_exact_count(&vars, "ndb_use_exact_count", &SV::ndb_use_exact_count);

--- 1.125/sql/ha_ndbcluster_binlog.cc	2007-06-07 11:05:30 +02:00
+++ 1.126/sql/ha_ndbcluster_binlog.cc	2007-06-08 22:22:18 +02:00
@@ -2461,32 +2461,40 @@
 set_binlog_flags(NDB_SHARE *share,
                  Ndb_binlog_type ndb_binlog_type)
 {
-  /* set NSF_USE_UPDATE flag */
-  if (ndb_binlog_type & NBT_USE_UPDATE ||
-      !opt_ndb_log_update_as_write)
-    set_binlog_use_update(share);
-
-  /* set NSF_FULL and NSF_NO_BINLOG */
   switch (ndb_binlog_type)
   {
-  case NBT_UPDATED_USE_UPDATE:
-  case NBT_UPDATED:
-    /* Updates only, is default */
-    break;
   case NBT_NO_LOGGING:
     set_binlog_nologging(share);
-    /* fall through */
-  case NBT_USE_UPDATE:
-    /* fall through */
+    return;
   case NBT_DEFAULT:
     if (opt_ndb_log_updated_only)
-      break;
-    /* fall through */
+      set_binlog_updated_only(share);
+    else
+      set_binlog_full(share);
+    if (opt_ndb_log_update_as_write)
+      set_binlog_use_write(share);
+    else
+      set_binlog_use_update(share);
+    break;
+  case NBT_UPDATED_ONLY:
+    set_binlog_updated_only(share);
+    set_binlog_use_write(share);
+    break;
+  case NBT_USE_UPDATE:
+  case NBT_UPDATED_ONLY_USE_UPDATE:
+    set_binlog_updated_only(share);
+    set_binlog_use_update(share);
+    break;
   case NBT_FULL:
+    set_binlog_full(share);
+    set_binlog_use_write(share);
+    break;
   case NBT_FULL_USE_UPDATE:
     set_binlog_full(share);
+    set_binlog_use_update(share);
     break;
   }
+  set_binlog_logging(share);
 }
 static int
 slave_set_resolve_max(NDB_SHARE *share, const NDBTAB *ndbtab, uint field_index)
@@ -3090,6 +3098,16 @@
      */
     ndbcluster_read_binlog_replication(current_thd, ndb, share, ndbtab, ::server_id);
 
+    /*
+      check if logging turned off for this table
+    */
+    if (get_binlog_nologging(share))
+    {
+      if (ndb_extra_logging)
+        sql_print_information("NDB Binlog: NOT logging %s", share->key);
+      DBUG_RETURN(0);
+    }
+
     String event_name(INJECTOR_EVENT_LEN);
     ndb_rep_event_name(&event_name, db, table_name, get_binlog_full(share));
     /*
@@ -3151,8 +3169,10 @@
     DBUG_PRINT("info", ("share == NULL"));
     DBUG_RETURN(0);
   }
-  if (share->flags & NSF_NO_BINLOG)
+  if (get_binlog_nologging(share))
   {
+    if (ndb_extra_logging && ndb_binlog_running)
+      sql_print_information("NDB Binlog: NOT logging %s", share->key);
     DBUG_PRINT("info", ("share->flags & NSF_NO_BINLOG, flags: %x %d",
                         share->flags, share->flags & NSF_NO_BINLOG));
     DBUG_RETURN(0);
@@ -3324,7 +3344,7 @@
 
   DBUG_ASSERT(share != 0);
 
-  if (share->flags & NSF_NO_BINLOG)
+  if (get_binlog_nologging(share))
   {
     DBUG_PRINT("info", ("share->flags & NSF_NO_BINLOG, flags: %x",
                         share->flags));

--- 1.8/sql/ha_ndbcluster_tables.h	2007-06-06 18:40:16 +02:00
+++ 1.9/sql/ha_ndbcluster_tables.h	2007-06-08 22:22:18 +02:00
@@ -27,9 +27,9 @@
 {
   NBT_DEFAULT                   = 0
   ,NBT_NO_LOGGING               = 1
-  ,NBT_FULL                     = 2
-  ,NBT_UPDATED                  = 3
+  ,NBT_UPDATED_ONLY             = 2
+  ,NBT_FULL                     = 3
   ,NBT_USE_UPDATE               = 4 /* bit 0x4 indicates USE_UPDATE */
-  ,NBT_FULL_USE_UPDATE          = NBT_USE_UPDATE | NBT_FULL
-  ,NBT_UPDATED_USE_UPDATE       = NBT_USE_UPDATE | NBT_UPDATED
+  ,NBT_UPDATED_ONLY_USE_UPDATE  = NBT_UPDATED_ONLY | NBT_USE_UPDATE
+  ,NBT_FULL_USE_UPDATE          = NBT_FULL         | NBT_USE_UPDATE
 };

--- 1.2/mysql-test/r/rpl_ndb_conflict.result	2007-06-06 15:59:03 +02:00
+++ 1.3/mysql-test/r/rpl_ndb_conflict.result	2007-06-08 22:22:17 +02:00
@@ -4,6 +4,7 @@
 reset slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
+**** Test 1 ****
 insert into mysql.ndb_replication values ("test", "t1", 0, NULL, "NDB$MAX(X)");
 create table t1 (a int key, b varchar(32), X int unsigned) engine ndb;
 create table t2 (a int key, b varchar(32), c int unsigned) engine ndb;
@@ -70,6 +71,9 @@
 2	Master t2 a=2 at c=13	13
 3	Master t2 a=3 at c=13	13
 drop table t1, t2;
+**** Test 2 ****
+set global ndb_log_update_as_write=1;
+update mysql.ndb_replication set binlog_type=4;
 create table t1 (a int key, b varchar(32), X bigint unsigned) engine ndb;
 create table t2 (a int key, b varchar(32), c int unsigned) engine ndb;
 begin;
@@ -111,6 +115,74 @@
 1	Slave t1 a=1 at X=12	12
 2	Slave t1 a=2 at X=12	12
 3	Slave t1 a=3 at X=12	12
+select * from t2 order by a;
+a	b	c
+1	Master t2 a=1 at c=11	11
+2	Master t2 a=2 at c=11	11
+3	Master t2 a=3 at c=11	11
+begin;
+update t1 set b="Master t1 a=1 at X=13", X=13 where a=1;
+update t1 set b="Master t1 a=2 at X=13", X=13 where a=2;
+update t1 set b="Master t1 a=3 at X=13", X=13 where a=3;
+update t2 set b="Master t2 a=1 at c=13", c=13 where a=1;
+update t2 set b="Master t2 a=2 at c=13", c=13 where a=2;
+update t2 set b="Master t2 a=3 at c=13", c=13 where a=3;
+commit;
+select * from t1 order by a;
+a	b	X
+1	Master t1 a=1 at X=13	13
+2	Master t1 a=2 at X=13	13
+3	Master t1 a=3 at X=13	13
+select * from t2 order by a;
+a	b	c
+1	Master t2 a=1 at c=13	13
+2	Master t2 a=2 at c=13	13
+3	Master t2 a=3 at c=13	13
+drop table t1, t2;
+**** Test 3 ****
+set global ndb_log_update_as_write=0;
+update mysql.ndb_replication set binlog_type=2;
+create table t1 (a int key, b varchar(32), X int unsigned) engine ndb;
+create table t2 (a int key, b varchar(32), c int unsigned) engine ndb;
+begin;
+insert into t1 values (1, "Master t1 a=1 at X=10", 10);
+insert into t1 values (2, "Master t1 a=2 at X=10", 10);
+insert into t1 values (3, "Master t1 a=3 at X=10", 10);
+insert into t2 values (1, "Master t2 a=1 at c=10", 10);
+insert into t2 values (2, "Master t2 a=2 at c=10", 10);
+insert into t2 values (3, "Master t2 a=3 at c=10", 10);
+commit;
+select * from t1 order by a;
+a	b	X
+1	Master t1 a=1 at X=10	10
+2	Master t1 a=2 at X=10	10
+3	Master t1 a=3 at X=10	10
+select * from t2 order by a;
+a	b	c
+1	Master t2 a=1 at c=10	10
+2	Master t2 a=2 at c=10	10
+3	Master t2 a=3 at c=10	10
+begin;
+update t1 set b="Slave t1 a=1 at X=12", X=12 where a=1;
+update t1 set b="Slave t1 a=2 at X=12", X=12 where a=2;
+update t1 set b="Slave t1 a=3 at X=12", X=12 where a=3;
+update t2 set b="Slave t2 a=1 at c=12", c=12 where a=1;
+update t2 set b="Slave t2 a=2 at c=12", c=12 where a=2;
+update t2 set b="Slave t2 a=3 at c=12", c=12 where a=3;
+commit;
+begin;
+update t1 set b="Master t1 a=1 at X=11", X=11 where a=1;
+update t1 set b="Master t1 a=2 at X=11", X=11 where a=2;
+update t1 set b="Master t1 a=3 at X=11", X=11 where a=3;
+update t2 set b="Master t2 a=1 at c=11", c=11 where a=1;
+update t2 set b="Master t2 a=2 at c=11", c=11 where a=2;
+update t2 set b="Master t2 a=3 at c=11", c=11 where a=3;
+commit;
+select * from t1 order by a;
+a	b	X
+1	Master t1 a=1 at X=11	11
+2	Master t1 a=2 at X=11	11
+3	Master t1 a=3 at X=11	11
 select * from t2 order by a;
 a	b	c
 1	Master t2 a=1 at c=11	11
--- New file ---
+++ mysql-test/r/rpl_ndb_logging.result	07/06/08 22:22:18
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
**** Test 1 ****
delete from mysql.ndb_replication;
insert into mysql.ndb_replication values ("test", "t1", 0, 1, NULL);
create table t1 (a int key, b varchar(32), c varchar(32)) engine ndb;
create table t2 (a int key, b varchar(32), c varchar(32)) engine ndb;
insert into t1 values (1,"t1.b from master", "t1.c from master");
insert into t2 values (1,"t2.b from master", "t2.c from master");
select * from t1;
a	b	c
select * from t2;
a	b	c
1	t2.b from master	t2.c from master
drop table t1;
drop table t2;
**** Test 2 ****
delete from mysql.ndb_replication;
insert into mysql.ndb_replication values ("test", "t1", 0, 2, NULL);
set global ndb_log_updated_only=0;
create table t1 (a int key, b varchar(32), c varchar(32)) engine ndb;
create table t2 (a int key, b varchar(32), c varchar(32)) engine ndb;
insert into t1 values (1,"t1.b from master", "t1.c from master");
insert into t2 values (1,"t2.b from master", "t2.c from master");
select * from t1;
a	b	c
1	t1.b from master	t1.c from master
select * from t2;
a	b	c
1	t2.b from master	t2.c from master
update t1 set c="t1.c from slave";
update t2 set c="t2.c from slave";
update t1 set b="updated t1.b from master";
update t2 set b="updated t2.b from master";
select * from t1;
a	b	c
1	updated t1.b from master	t1.c from slave
select * from t2;
a	b	c
1	updated t2.b from master	t2.c from master
drop table t1;
drop table t2;
**** Test 3 ****
delete from mysql.ndb_replication;
insert into mysql.ndb_replication values ("test", "t1", 0, 3, NULL);
set global ndb_log_updated_only=1;
create table t1 (a int key, b varchar(32), c varchar(32)) engine ndb;
create table t2 (a int key, b varchar(32), c varchar(32)) engine ndb;
insert into t1 values (1,"t1.b from master", "t1.c from master");
insert into t2 values (1,"t2.b from master", "t2.c from master");
select * from t1;
a	b	c
1	t1.b from master	t1.c from master
select * from t2;
a	b	c
1	t2.b from master	t2.c from master
update t1 set c="t1.c from slave";
update t2 set c="t2.c from slave";
update t1 set b="updated t1.b from master";
update t2 set b="updated t2.b from master";
select * from t1;
a	b	c
1	updated t1.b from master	t1.c from master
select * from t2;
a	b	c
1	updated t2.b from master	t2.c from slave
drop table t1;
drop table t2;


--- 1.4/mysql-test/t/rpl_ndb_conflict.test	2007-06-06 15:59:03 +02:00
+++ 1.5/mysql-test/t/rpl_ndb_conflict.test	2007-06-08 22:22:17 +02:00
@@ -8,7 +8,7 @@
 
 --disable_warnings
 --disable_query_log
---connection slave
+--connection master
 drop table if exists mysql.ndb_replication;
 CREATE TABLE mysql.ndb_replication
   (db VARBINARY(63),
@@ -21,17 +21,36 @@
 --enable_warnings
 --enable_query_log
 
+##
+# test native NDB$MAX() conflict resolution
+# test with both allowed "conflict column" types, uint32 and uint64
 #
-# test native NDB$MAX() conflict resulution
-#
---connection slave
+--echo **** Test 1 ****
+--connection master
 insert into mysql.ndb_replication values ("test", "t1", 0, NULL, "NDB$MAX(X)");
 --let col_type = int unsigned
 --source extra/rpl_tests/rpl_ndb_conflict_1.test
+# test that setting binlog update option via table works equally well
+--echo **** Test 2 ****
+--connection master
+set global ndb_log_update_as_write=1;
+update mysql.ndb_replication set binlog_type=4;
 --let col_type = bigint unsigned
 --source extra/rpl_tests/rpl_ndb_conflict_1.test
 
+##
+# test that setting binlog type really also sets the "USE_UPDATE" flag
+# in this case it will result in conflict resolution failure, as
+# update_row never gets called
+#
+--echo **** Test 3 ****
+--connection master
+set global ndb_log_update_as_write=0;
+update mysql.ndb_replication set binlog_type=2;
+--let col_type = int unsigned
+--source extra/rpl_tests/rpl_ndb_conflict_1.test
+
 --disable_query_log
---connection slave
+--connection master
 drop table mysql.ndb_replication;
 --enable_query_log
--- New file ---
+++ mysql-test/t/rpl_ndb_logging.test	07/06/08 22:22:18
#
# Test engine logging options for ndb
#
--source include/have_ndb.inc
--source include/have_binlog_format_row.inc
--source include/master-slave.inc

--disable_warnings
--disable_query_log
--connection master
# default settings for the mysqld
set global ndb_log_update_as_write=1;
set global ndb_log_updated_only=1;
# create the ndb_replication table
drop table if exists mysql.ndb_replication;
CREATE TABLE mysql.ndb_replication
  (db VARBINARY(63),
   table_name VARBINARY(63),
   server_id INT UNSIGNED,
   binlog_type INT UNSIGNED,
   conflict_fn VARBINARY(128),
   PRIMARY KEY USING HASH (db,table_name,server_id))
  ENGINE=NDB PARTITION BY KEY(db,table_name);
--enable_warnings
--enable_query_log

##
# no logging option = 1
#
--echo **** Test 1 ****
--connection master
delete from mysql.ndb_replication;
insert into mysql.ndb_replication values ("test", "t1", 0, 1, NULL);
create table t1 (a int key, b varchar(32), c varchar(32)) engine ndb;
create table t2 (a int key, b varchar(32), c varchar(32)) engine ndb;
insert into t1 values (1,"t1.b from master", "t1.c from master");
insert into t2 values (1,"t2.b from master", "t2.c from master");
#
# connect to slave and ensure data it there from t2 but not from t1
#
--sync_slave_with_master
--connection slave
select * from t1;
select * from t2;
--connection master
drop table t1;
drop table t2;

##
# updated logging option = 2
#
--echo **** Test 2 ****
--connection master
delete from mysql.ndb_replication;
insert into mysql.ndb_replication values ("test", "t1", 0, 2, NULL);
#
# table t1 should get the opption from the table overriding the setting
# in the server, t2 will get full row updates as it is the server setting
#
set global ndb_log_updated_only=0;
create table t1 (a int key, b varchar(32), c varchar(32)) engine ndb;
create table t2 (a int key, b varchar(32), c varchar(32)) engine ndb;
insert into t1 values (1,"t1.b from master", "t1.c from master");
insert into t2 values (1,"t2.b from master", "t2.c from master");
#
# connect to slave and ensure data it there
#
--sync_slave_with_master
--connection slave
select * from t1;
select * from t2;
#
# now make an update on the slave
#
update t1 set c="t1.c from slave";
update t2 set c="t2.c from slave";
#
# and back to the master to update difffrent columns there
#
--connection master
update t1 set b="updated t1.b from master";
update t2 set b="updated t2.b from master";
#
# connect to slave and ensure data it there, but a mix of slave/master
# updates
#
--sync_slave_with_master
--connection slave
select * from t1;
select * from t2;
--connection master
drop table t1;
drop table t2;

##
# full logging option = 3
#
--echo **** Test 3 ****
--connection master
delete from mysql.ndb_replication;
insert into mysql.ndb_replication values ("test", "t1", 0, 3, NULL);
# back to default
set global ndb_log_updated_only=1;
create table t1 (a int key, b varchar(32), c varchar(32)) engine ndb;
create table t2 (a int key, b varchar(32), c varchar(32)) engine ndb;
insert into t1 values (1,"t1.b from master", "t1.c from master");
insert into t2 values (1,"t2.b from master", "t2.c from master");
#
# connect to slave and ensure data it there
#
--sync_slave_with_master
--connection slave
select * from t1;
select * from t2;
#
# now make an update on the slave
#
update t1 set c="t1.c from slave";
update t2 set c="t2.c from slave";
#
# and back to the master to update difffrent columns there
#
--connection master
update t1 set b="updated t1.b from master";
update t2 set b="updated t2.b from master";
#
# connect to slave and ensure data it there, but a mix of slave/master
# updates for t2 but not for t1
#
--sync_slave_with_master
--connection slave
select * from t1;
select * from t2;
--connection master
drop table t1;
drop table t2;

Thread
bk commit into 5.1 tree (tomas:1.2527)tomas8 Jun