List:Commits« Previous MessageNext Message »
From:rsomla Date:August 25 2007 11:16am
Subject:bk commit into 5.1 tree (rafal:1.2571) BUG#21842
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of rafal. When rafal 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-08-25 13:16:43+02:00, rafal@quant.(none) +6 -0
  BUG#21842 (Cluster fails to replicate to innodb or myisam with err 134 
  using TPC-B):
    
  (It is adaptation of a patch prepared before for 5.1-new-rpl tree to
   5.1-target-5.1.22) 
  
  This patch introduces test rpl_ndb_2other which tests basic replication 
  from master using ndb tables to slave storing the same tables using 
  (possibly) different engine (myisam,innodb).
    
  Test is based on existing tests rpl_ndb_2myisam and rpl_ndb_2innodb. 
  However, these tests doesn't work for various reasons and currently are 
  disabled (see BUG#19227).
    
  The new test differs from the ones it is based on as follows:
    
  1. Single test tests replication with different storage engines on slave 
  (myisam, innodb, ndb).
    
  2. Include file extra/rpl_tests/rpl_ndb_2multi_eng.test containing 
  original tests is replaced by extra/rpl_tests/rpl_ndb_2multi_basic.test 
  which doesn't contain tests using partitioned tables as these don't work 
  currently. Instead, it tests replication to a slave which has more or 
  less columns than master.
    
  3. Include file include/rpl_multi_engine3.inc is replaced with 
  include/rpl_multi_engine2.inc. The later differs by performing slightly 
  different operations (updating more than one row in the table) and 
  clearing table with "TRUNCATE TABLE" statement instead of "DELETE FROM" 
  as replication of "DELETE" doesn't work well in this setting.
    
  4. Slave must use option --log-slave-updates=0 as otherwise execution of 
  replication events generated by ndb fails if table uses a different 
  storage engine on slave (see BUG#29569).

  BitKeeper/etc/ignore@stripped, 2007-08-25 13:16:39+02:00, rafal@quant.(none) +2 -0
    Added mysql-test/include/rpl_multi_engine2_data.inc mysql-test/include/rpl_multi_engine2_queries.inc to the ignore list

  mysql-test/extra/rpl_tests/rpl_ndb_2multi_basic.test@stripped, 2007-08-25 13:16:39+02:00, rafal@quant.(none) +119 -0
    Modification of rpl_ndb_2multi_eng test. Tests with partitioned tables 
    are removed and a setup with slave having different number of columns 
    than master is added.

  mysql-test/extra/rpl_tests/rpl_ndb_2multi_basic.test@stripped, 2007-08-25 13:16:38+02:00, rafal@quant.(none) +0 -0

  mysql-test/include/rpl_multi_engine2.inc@stripped, 2007-08-25 13:16:39+02:00, rafal@quant.(none) +91 -0
    Modification of rpl_multi_engine3.inc which operates on more rows and
    replaces "DELETE FROM t1" with "TRUNCATE TABLE t1" as the first form
    doesn't replicate in NDB -> non-NDB setting (BUG#28538).

  mysql-test/include/rpl_multi_engine2.inc@stripped, 2007-08-25 13:16:39+02:00, rafal@quant.(none) +0 -0

  mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result@stripped, 2007-08-25 13:16:39+02:00, rafal@quant.(none) +1186 -0
    Results of the test.

  mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result@stripped, 2007-08-25 13:16:39+02:00, rafal@quant.(none) +0 -0

  mysql-test/suite/rpl_ndb/t/rpl_ndb_2other-slave.opt@stripped, 2007-08-25 13:16:39+02:00, rafal@quant.(none) +1 -0
    Test options. --log-slave-updates=0 is compulsory as otherwise non-NDB 
    slave applying row events from NDB master will fail when trying to log
    them.

  mysql-test/suite/rpl_ndb/t/rpl_ndb_2other-slave.opt@stripped, 2007-08-25 13:16:39+02:00, rafal@quant.(none) +0 -0

  mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test@stripped, 2007-08-25 13:16:39+02:00, rafal@quant.(none) +34 -0
    Test replication of NDB table to slave using other engine. The main test
    is in extra/rpl_tests/rpl_ndb_2multi_basic.test. It is included here
    several times with different settings of default storage engine on slave.

  mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test@stripped, 2007-08-25 13:16:39+02:00, rafal@quant.(none) +0 -0

diff -Nrup a/BitKeeper/etc/ignore b/BitKeeper/etc/ignore
--- a/BitKeeper/etc/ignore	2007-08-04 03:44:42 +02:00
+++ b/BitKeeper/etc/ignore	2007-08-25 13:16:39 +02:00
@@ -3001,3 +3001,5 @@ win/vs71cache.txt
 win/vs8cache.txt
 zlib/*.ds?
 zlib/*.vcproj
+mysql-test/include/rpl_multi_engine2_data.inc
+mysql-test/include/rpl_multi_engine2_queries.inc
diff -Nrup a/mysql-test/extra/rpl_tests/rpl_ndb_2multi_basic.test b/mysql-test/extra/rpl_tests/rpl_ndb_2multi_basic.test
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/extra/rpl_tests/rpl_ndb_2multi_basic.test	2007-08-25 13:16:39 +02:00
@@ -0,0 +1,119 @@
+#######################################
+# Author: Rafal Somla                 #
+# Date: 2006-08-20                    #
+# Purpose: Test replication of basic  #
+# table operations in various setups  #   
+#                                     #
+# Based on rpl_ndb_2multi_eng.test by #
+# JBM                                 #
+#######################################
+
+--echo --- Doing pre test cleanup --- 
+
+connection master;
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_query_log
+
+#################################################
+--echo --- Create Table Section ---
+
+CREATE TABLE t1 (id MEDIUMINT NOT NULL, 
+                 b1 INT, 
+                 vc VARCHAR(255), 
+                 bc CHAR(255), 
+                 d DECIMAL(10,4) DEFAULT 0, 
+                 f FLOAT DEFAULT 0, 
+                 total BIGINT UNSIGNED, 
+                 y YEAR, 
+                 t DATE, 
+                 PRIMARY KEY(id));
+
+--echo --- Show table on master ---
+
+SHOW CREATE TABLE t1;
+
+--echo --- Show table on slave ---
+
+sync_slave_with_master;
+SHOW CREATE TABLE t1;
+
+--source include/rpl_multi_engine2.inc
+
+#################################################
+# Okay lets see how it holds up to table changes
+--echo --- Check that simple Alter statements are replicated correctly --
+
+ALTER TABLE t1 DROP PRIMARY KEY;
+# note: table with no PK can't contain blobs if it is to be replicated.
+ALTER TABLE t1 MODIFY vc char(32);  
+
+--echo --- Show the new improved table on the master ---
+
+SHOW CREATE TABLE t1;
+
+--echo --- Make sure that our tables on slave are still same engine ---
+--echo --- and that the alter statements replicated correctly ---
+
+sync_slave_with_master;
+SHOW CREATE TABLE t1;
+
+--source include/rpl_multi_engine2.inc
+
+#################################################
+--echo --- Check that replication works when slave has more columns than master
+connection master;
+ALTER TABLE t1 ADD PRIMARY KEY(id,total);
+ALTER TABLE t1 MODIFY vc TEXT;
+
+INSERT INTO t1 VALUES(3,1,'Testing MySQL databases is a cool ',
+                      'Must make it bug free for the customer',
+                       654321.4321,15.21,0,1965,"1905-11-14");
+INSERT INTO t1 VALUES(20,1,'Testing MySQL databases is a cool ',
+                      'Must make it bug free for the customer',
+                       654321.4321,15.21,0,1965,"1965-11-14");
+INSERT INTO t1 VALUES(50,1,'Testing MySQL databases is a cool ',
+                      'Must make it bug free for the customer',
+                       654321.4321,15.21,0,1965,"1985-11-14");
+
+--echo --- Add columns on slave ---
+--sync_slave_with_master
+ALTER TABLE t1 ADD (u int, v char(16) default 'default');
+UPDATE t1 SET u=7 WHERE id < 50;
+UPDATE t1 SET v='explicit' WHERE id >10;
+
+--echo --- Show changed table on slave ---
+
+SHOW CREATE TABLE t1;
+SELECT * 
+FROM t1
+ORDER BY id;
+
+--source include/rpl_multi_engine2.inc
+TRUNCATE TABLE t1;
+
+#################################################
+--echo --- Check that replication works when master has more columns than slave
+connection master;
+
+--echo --- Remove columns on slave ---
+--sync_slave_with_master
+ALTER TABLE t1 DROP COLUMN v;
+ALTER TABLE t1 DROP COLUMN u;
+ALTER TABLE t1 DROP COLUMN t;
+ALTER TABLE t1 DROP COLUMN y;
+
+--echo --- Show changed table on slave ---
+
+SHOW CREATE TABLE t1;
+
+--source include/rpl_multi_engine2.inc
+TRUNCATE TABLE t1;
+
+#################################################
+--echo --- Do Cleanup --
+connection master;
+DROP TABLE IF EXISTS t1;
+
+sync_slave_with_master;
+connection master;
diff -Nrup a/mysql-test/include/rpl_multi_engine2.inc b/mysql-test/include/rpl_multi_engine2.inc
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/include/rpl_multi_engine2.inc	2007-08-25 13:16:39 +02:00
@@ -0,0 +1,91 @@
+#############################################################
+# Author: Rafal
+# Date: 2007-08-20
+# based on rpl_multi_engine3.inc
+#############################################################
+
+connection slave;
+STOP SLAVE;
+RESET SLAVE;
+
+connection master;
+RESET MASTER;
+
+connection slave;
+START SLAVE;
+
+--echo --- Populate t1 with data ---
+connection master;
+--disable_query_log
+INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ',
+                      'Must make it bug free for the customer',
+                       654321.4321,15.21,0,1965,"1905-11-14");
+INSERT INTO t1 VALUES(2,1,'Testing MySQL databases is a cool ',
+                      'Must make it bug free for the customer',
+                       654321.4321,15.21,0,1965,"1965-11-14");
+INSERT INTO t1 VALUES(4,1,'Testing MySQL databases is a cool ',
+                      'Must make it bug free for the customer',
+                       654321.4321,15.21,0,1965,"1985-11-14");
+INSERT INTO t1 VALUES(142,1,'Testing MySQL databases is a cool ',
+                      'Must make it bug free for the customer',
+                       654321.4321,15.21,0,1965,"1995-11-14");
+INSERT INTO t1 VALUES(412,1,'Testing MySQL databases is a cool ',
+                      'Must make it bug free for the customer',
+                       654321.4321,15.21,0,1965,"2005-11-14");
+--enable_query_log
+
+--echo --- Select from t1 on master --- 
+select *
+from t1 
+order by id;
+
+sync_slave_with_master;
+--echo --- Select from t1 on slave ---
+select *
+from t1 
+order by id;
+
+--echo --- Perform basic operation on master ---
+--echo --- and ensure replicated correctly ---
+connection master;
+
+--echo --- Update t1 on master --
+UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" 
+WHERE id < 100 
+ORDER BY id;
+
+--echo --- Check the update on master --- 
+SELECT *
+FROM t1 
+WHERE id < 100
+ORDER BY id;
+
+# Must give injector thread a little time to get update
+# into the binlog other wise we will miss the update.
+
+sync_slave_with_master;
+--echo --- Check Update on slave ---
+SELECT *
+FROM t1 
+WHERE id < 100
+ORDER BY id;
+
+connection master;
+--echo --- Remove a record from t1 on master ---
+# Note: there is an error in replication of Delete_row
+# from NDB to MyISAM (BUG#28538). However, if there is
+# only one row in Delete_row event then it works fine,
+# as this test demonstrates.
+DELETE FROM t1 WHERE id = 412;
+
+--echo --- Show current count on master for t1 ---
+SELECT COUNT(*) FROM t1;
+
+sync_slave_with_master;
+--echo --- Show current count on slave for t1 --- 
+SELECT COUNT(*) FROM t1;
+
+connection master;
+TRUNCATE TABLE t1;
+sync_slave_with_master;
+connection master;
diff -Nrup a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result	2007-08-25 13:16:39 +02:00
@@ -0,0 +1,1186 @@
+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;
+SET storage_engine=ndb;
+
+=== NDB -> MYISAM ===
+
+SET storage_engine=myisam;
+--- Doing pre test cleanup --- 
+DROP TABLE IF EXISTS t1;
+--- Create Table Section ---
+CREATE TABLE t1 (id MEDIUMINT NOT NULL, 
+b1 INT, vc VARCHAR(255), 
+bc CHAR(255), 
+d DECIMAL(10,4) DEFAULT 0, 
+f FLOAT DEFAULT 0, 
+total BIGINT UNSIGNED, 
+y YEAR, 
+t DATE, 
+PRIMARY KEY(id));
+--- Show table on master ---
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `id` mediumint(9) NOT NULL,
+  `b1` int(11) DEFAULT NULL,
+  `vc` varchar(255) DEFAULT NULL,
+  `bc` char(255) DEFAULT NULL,
+  `d` decimal(10,4) DEFAULT '0.0000',
+  `f` float DEFAULT '0',
+  `total` bigint(20) unsigned DEFAULT NULL,
+  `y` year(4) DEFAULT NULL,
+  `t` date DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1
+--- Show table on slave ---
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `id` mediumint(9) NOT NULL,
+  `b1` int(11) DEFAULT NULL,
+  `vc` varchar(255) DEFAULT NULL,
+  `bc` char(255) DEFAULT NULL,
+  `d` decimal(10,4) DEFAULT '0.0000',
+  `f` float DEFAULT '0',
+  `total` bigint(20) unsigned DEFAULT NULL,
+  `y` year(4) DEFAULT NULL,
+  `t` date DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+STOP SLAVE;
+RESET SLAVE;
+RESET MASTER;
+START SLAVE;
+--- Populate t1 with data ---
+--- Select from t1 on master --- 
+select *
+from t1 
+order by id;
+id	b1	vc	bc	d	f	total	y	t
+2	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14
+4	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14
+42	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14
+142	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1995-11-14
+412	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	2005-11-14
+--- Select from t1 on slave ---
+select *
+from t1 
+order by id;
+id	b1	vc	bc	d	f	total	y	t
+2	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14
+4	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14
+42	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14
+142	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1995-11-14
+412	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	2005-11-14
+--- Perform basic operation on master ---
+--- and ensure replicated correctly ---
+--- Update t1 on master --
+UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" 
+WHERE id < 100 
+ORDER BY id;
+--- Check the update on master --- 
+SELECT *
+FROM t1 
+WHERE id < 100
+ORDER BY id;
+id	b1	vc	bc	d	f	total	y	t
+2	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+4	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+42	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+--- Check Update on slave ---
+SELECT *
+FROM t1 
+WHERE id < 100
+ORDER BY id;
+id	b1	vc	bc	d	f	total	y	t
+2	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+4	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+42	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+--- Remove a record from t1 on master ---
+DELETE FROM t1 WHERE id = 412;
+--- Show current count on master for t1 ---
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+4
+--- Show current count on slave for t1 --- 
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+4
+TRUNCATE TABLE t1;
+--- Check that simple Alter statements are replicated correctly --
+ALTER TABLE t1 DROP PRIMARY KEY;
+ALTER TABLE t1 MODIFY vc char(32);
+--- Show the new improved table on the master ---
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `id` mediumint(9) NOT NULL,
+  `b1` int(11) DEFAULT NULL,
+  `vc` char(32) DEFAULT NULL,
+  `bc` char(255) DEFAULT NULL,
+  `d` decimal(10,4) DEFAULT '0.0000',
+  `f` float DEFAULT '0',
+  `total` bigint(20) unsigned DEFAULT NULL,
+  `y` year(4) DEFAULT NULL,
+  `t` date DEFAULT NULL
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1
+--- Make sure that our tables on slave are still same engine ---
+--- and that the alter statements replicated correctly ---
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `id` mediumint(9) NOT NULL,
+  `b1` int(11) DEFAULT NULL,
+  `vc` char(32) DEFAULT NULL,
+  `bc` char(255) DEFAULT NULL,
+  `d` decimal(10,4) DEFAULT '0.0000',
+  `f` float DEFAULT '0',
+  `total` bigint(20) unsigned DEFAULT NULL,
+  `y` year(4) DEFAULT NULL,
+  `t` date DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+STOP SLAVE;
+RESET SLAVE;
+RESET MASTER;
+START SLAVE;
+--- Populate t1 with data ---
+--- Select from t1 on master --- 
+select *
+from t1 
+order by id;
+id	b1	vc	bc	d	f	total	y	t
+2	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14
+4	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14
+42	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14
+142	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	1995-11-14
+412	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	2005-11-14
+--- Select from t1 on slave ---
+select *
+from t1 
+order by id;
+id	b1	vc	bc	d	f	total	y	t
+2	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14
+4	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14
+42	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14
+142	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	1995-11-14
+412	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	2005-11-14
+--- Perform basic operation on master ---
+--- and ensure replicated correctly ---
+--- Update t1 on master --
+UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" 
+WHERE id < 100 
+ORDER BY id;
+--- Check the update on master --- 
+SELECT *
+FROM t1 
+WHERE id < 100
+ORDER BY id;
+id	b1	vc	bc	d	f	total	y	t
+2	0	Testing MySQL databases is a coo	updated	654321.4321	15.21	0	1965	2006-02-22
+4	0	Testing MySQL databases is a coo	updated	654321.4321	15.21	0	1965	2006-02-22
+42	0	Testing MySQL databases is a coo	updated	654321.4321	15.21	0	1965	2006-02-22
+--- Check Update on slave ---
+SELECT *
+FROM t1 
+WHERE id < 100
+ORDER BY id;
+id	b1	vc	bc	d	f	total	y	t
+2	0	Testing MySQL databases is a coo	updated	654321.4321	15.21	0	1965	2006-02-22
+4	0	Testing MySQL databases is a coo	updated	654321.4321	15.21	0	1965	2006-02-22
+42	0	Testing MySQL databases is a coo	updated	654321.4321	15.21	0	1965	2006-02-22
+--- Remove a record from t1 on master ---
+DELETE FROM t1 WHERE id = 412;
+--- Show current count on master for t1 ---
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+4
+--- Show current count on slave for t1 --- 
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+4
+TRUNCATE TABLE t1;
+--- Check that replication works when slave has more columns than master
+ALTER TABLE t1 ADD PRIMARY KEY(id,total);
+ALTER TABLE t1 MODIFY vc TEXT;
+INSERT INTO t1 VALUES(3,1,'Testing MySQL databases is a cool ',
+'Must make it bug free for the customer',
+654321.4321,15.21,0,1965,"1905-11-14");
+INSERT INTO t1 VALUES(20,1,'Testing MySQL databases is a cool ',
+'Must make it bug free for the customer',
+654321.4321,15.21,0,1965,"1965-11-14");
+INSERT INTO t1 VALUES(50,1,'Testing MySQL databases is a cool ',
+'Must make it bug free for the customer',
+654321.4321,15.21,0,1965,"1985-11-14");
+--- Add columns on slave ---
+ALTER TABLE t1 ADD (u int, v char(16) default 'default');
+UPDATE t1 SET u=7 WHERE id < 50;
+UPDATE t1 SET v='explicit' WHERE id >10;
+--- Show changed table on slave ---
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `id` mediumint(9) NOT NULL,
+  `b1` int(11) DEFAULT NULL,
+  `vc` text,
+  `bc` char(255) DEFAULT NULL,
+  `d` decimal(10,4) DEFAULT '0.0000',
+  `f` float DEFAULT '0',
+  `total` bigint(20) unsigned NOT NULL DEFAULT '0',
+  `y` year(4) DEFAULT NULL,
+  `t` date DEFAULT NULL,
+  `u` int(11) DEFAULT NULL,
+  `v` char(16) DEFAULT 'default',
+  PRIMARY KEY (`id`,`total`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT * 
+FROM t1
+ORDER BY id;
+id	b1	vc	bc	d	f	total	y	t	u	v
+3	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14	7	default
+20	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14	7	explicit
+50	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14	NULL	explicit
+STOP SLAVE;
+RESET SLAVE;
+RESET MASTER;
+START SLAVE;
+--- Populate t1 with data ---
+--- Select from t1 on master --- 
+select *
+from t1 
+order by id;
+id	b1	vc	bc	d	f	total	y	t
+2	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14
+3	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14
+4	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14
+20	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14
+42	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14
+50	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14
+142	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1995-11-14
+412	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	2005-11-14
+--- Select from t1 on slave ---
+select *
+from t1 
+order by id;
+id	b1	vc	bc	d	f	total	y	t	u	v
+2	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14	NULL	default
+3	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14	7	default
+4	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14	NULL	default
+20	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14	7	explicit
+42	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14	NULL	default
+50	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14	NULL	explicit
+142	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1995-11-14	NULL	default
+412	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	2005-11-14	NULL	default
+--- Perform basic operation on master ---
+--- and ensure replicated correctly ---
+--- Update t1 on master --
+UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" 
+WHERE id < 100 
+ORDER BY id;
+--- Check the update on master --- 
+SELECT *
+FROM t1 
+WHERE id < 100
+ORDER BY id;
+id	b1	vc	bc	d	f	total	y	t
+2	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+3	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+4	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+20	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+42	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+50	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+--- Check Update on slave ---
+SELECT *
+FROM t1 
+WHERE id < 100
+ORDER BY id;
+id	b1	vc	bc	d	f	total	y	t	u	v
+2	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22	NULL	default
+3	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22	7	default
+4	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22	NULL	default
+20	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22	7	explicit
+42	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22	NULL	default
+50	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22	NULL	explicit
+--- Remove a record from t1 on master ---
+DELETE FROM t1 WHERE id = 412;
+--- Show current count on master for t1 ---
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+7
+--- Show current count on slave for t1 --- 
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+7
+TRUNCATE TABLE t1;
+TRUNCATE TABLE t1;
+--- Check that replication works when master has more columns than slave
+--- Remove columns on slave ---
+ALTER TABLE t1 DROP COLUMN v;
+ALTER TABLE t1 DROP COLUMN u;
+ALTER TABLE t1 DROP COLUMN t;
+ALTER TABLE t1 DROP COLUMN y;
+--- Show changed table on slave ---
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `id` mediumint(9) NOT NULL,
+  `b1` int(11) DEFAULT NULL,
+  `vc` text,
+  `bc` char(255) DEFAULT NULL,
+  `d` decimal(10,4) DEFAULT '0.0000',
+  `f` float DEFAULT '0',
+  `total` bigint(20) unsigned NOT NULL DEFAULT '0',
+  PRIMARY KEY (`id`,`total`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+STOP SLAVE;
+RESET SLAVE;
+RESET MASTER;
+START SLAVE;
+--- Populate t1 with data ---
+--- Select from t1 on master --- 
+select *
+from t1 
+order by id;
+id	b1	vc	bc	d	f	total	y	t
+2	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14
+4	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14
+42	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14
+142	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1995-11-14
+412	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	2005-11-14
+--- Select from t1 on slave ---
+select *
+from t1 
+order by id;
+id	b1	vc	bc	d	f	total
+2	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0
+4	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0
+42	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0
+142	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0
+412	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0
+--- Perform basic operation on master ---
+--- and ensure replicated correctly ---
+--- Update t1 on master --
+UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" 
+WHERE id < 100 
+ORDER BY id;
+--- Check the update on master --- 
+SELECT *
+FROM t1 
+WHERE id < 100
+ORDER BY id;
+id	b1	vc	bc	d	f	total	y	t
+2	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+4	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+42	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+--- Check Update on slave ---
+SELECT *
+FROM t1 
+WHERE id < 100
+ORDER BY id;
+id	b1	vc	bc	d	f	total
+2	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0
+4	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0
+42	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0
+--- Remove a record from t1 on master ---
+DELETE FROM t1 WHERE id = 412;
+--- Show current count on master for t1 ---
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+4
+--- Show current count on slave for t1 --- 
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+4
+TRUNCATE TABLE t1;
+TRUNCATE TABLE t1;
+--- Do Cleanup --
+DROP TABLE IF EXISTS t1;
+
+=== NDB -> INNODB ===
+
+SET storage_engine=innodb;
+--- Doing pre test cleanup --- 
+DROP TABLE IF EXISTS t1;
+--- Create Table Section ---
+CREATE TABLE t1 (id MEDIUMINT NOT NULL, 
+b1 INT, vc VARCHAR(255), 
+bc CHAR(255), 
+d DECIMAL(10,4) DEFAULT 0, 
+f FLOAT DEFAULT 0, 
+total BIGINT UNSIGNED, 
+y YEAR, 
+t DATE, 
+PRIMARY KEY(id));
+--- Show table on master ---
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `id` mediumint(9) NOT NULL,
+  `b1` int(11) DEFAULT NULL,
+  `vc` varchar(255) DEFAULT NULL,
+  `bc` char(255) DEFAULT NULL,
+  `d` decimal(10,4) DEFAULT '0.0000',
+  `f` float DEFAULT '0',
+  `total` bigint(20) unsigned DEFAULT NULL,
+  `y` year(4) DEFAULT NULL,
+  `t` date DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1
+--- Show table on slave ---
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `id` mediumint(9) NOT NULL,
+  `b1` int(11) DEFAULT NULL,
+  `vc` varchar(255) DEFAULT NULL,
+  `bc` char(255) DEFAULT NULL,
+  `d` decimal(10,4) DEFAULT '0.0000',
+  `f` float DEFAULT '0',
+  `total` bigint(20) unsigned DEFAULT NULL,
+  `y` year(4) DEFAULT NULL,
+  `t` date DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+STOP SLAVE;
+RESET SLAVE;
+RESET MASTER;
+START SLAVE;
+--- Populate t1 with data ---
+--- Select from t1 on master --- 
+select *
+from t1 
+order by id;
+id	b1	vc	bc	d	f	total	y	t
+2	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14
+4	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14
+42	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14
+142	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1995-11-14
+412	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	2005-11-14
+--- Select from t1 on slave ---
+select *
+from t1 
+order by id;
+id	b1	vc	bc	d	f	total	y	t
+2	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14
+4	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14
+42	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14
+142	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1995-11-14
+412	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	2005-11-14
+--- Perform basic operation on master ---
+--- and ensure replicated correctly ---
+--- Update t1 on master --
+UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" 
+WHERE id < 100 
+ORDER BY id;
+--- Check the update on master --- 
+SELECT *
+FROM t1 
+WHERE id < 100
+ORDER BY id;
+id	b1	vc	bc	d	f	total	y	t
+2	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+4	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+42	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+--- Check Update on slave ---
+SELECT *
+FROM t1 
+WHERE id < 100
+ORDER BY id;
+id	b1	vc	bc	d	f	total	y	t
+2	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+4	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+42	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+--- Remove a record from t1 on master ---
+DELETE FROM t1 WHERE id = 412;
+--- Show current count on master for t1 ---
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+4
+--- Show current count on slave for t1 --- 
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+4
+TRUNCATE TABLE t1;
+--- Check that simple Alter statements are replicated correctly --
+ALTER TABLE t1 DROP PRIMARY KEY;
+ALTER TABLE t1 MODIFY vc char(32);
+--- Show the new improved table on the master ---
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `id` mediumint(9) NOT NULL,
+  `b1` int(11) DEFAULT NULL,
+  `vc` char(32) DEFAULT NULL,
+  `bc` char(255) DEFAULT NULL,
+  `d` decimal(10,4) DEFAULT '0.0000',
+  `f` float DEFAULT '0',
+  `total` bigint(20) unsigned DEFAULT NULL,
+  `y` year(4) DEFAULT NULL,
+  `t` date DEFAULT NULL
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1
+--- Make sure that our tables on slave are still same engine ---
+--- and that the alter statements replicated correctly ---
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `id` mediumint(9) NOT NULL,
+  `b1` int(11) DEFAULT NULL,
+  `vc` char(32) DEFAULT NULL,
+  `bc` char(255) DEFAULT NULL,
+  `d` decimal(10,4) DEFAULT '0.0000',
+  `f` float DEFAULT '0',
+  `total` bigint(20) unsigned DEFAULT NULL,
+  `y` year(4) DEFAULT NULL,
+  `t` date DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+STOP SLAVE;
+RESET SLAVE;
+RESET MASTER;
+START SLAVE;
+--- Populate t1 with data ---
+--- Select from t1 on master --- 
+select *
+from t1 
+order by id;
+id	b1	vc	bc	d	f	total	y	t
+2	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14
+4	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14
+42	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14
+142	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	1995-11-14
+412	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	2005-11-14
+--- Select from t1 on slave ---
+select *
+from t1 
+order by id;
+id	b1	vc	bc	d	f	total	y	t
+2	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14
+4	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14
+42	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14
+142	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	1995-11-14
+412	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	2005-11-14
+--- Perform basic operation on master ---
+--- and ensure replicated correctly ---
+--- Update t1 on master --
+UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" 
+WHERE id < 100 
+ORDER BY id;
+--- Check the update on master --- 
+SELECT *
+FROM t1 
+WHERE id < 100
+ORDER BY id;
+id	b1	vc	bc	d	f	total	y	t
+2	0	Testing MySQL databases is a coo	updated	654321.4321	15.21	0	1965	2006-02-22
+4	0	Testing MySQL databases is a coo	updated	654321.4321	15.21	0	1965	2006-02-22
+42	0	Testing MySQL databases is a coo	updated	654321.4321	15.21	0	1965	2006-02-22
+--- Check Update on slave ---
+SELECT *
+FROM t1 
+WHERE id < 100
+ORDER BY id;
+id	b1	vc	bc	d	f	total	y	t
+2	0	Testing MySQL databases is a coo	updated	654321.4321	15.21	0	1965	2006-02-22
+4	0	Testing MySQL databases is a coo	updated	654321.4321	15.21	0	1965	2006-02-22
+42	0	Testing MySQL databases is a coo	updated	654321.4321	15.21	0	1965	2006-02-22
+--- Remove a record from t1 on master ---
+DELETE FROM t1 WHERE id = 412;
+--- Show current count on master for t1 ---
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+4
+--- Show current count on slave for t1 --- 
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+4
+TRUNCATE TABLE t1;
+--- Check that replication works when slave has more columns than master
+ALTER TABLE t1 ADD PRIMARY KEY(id,total);
+ALTER TABLE t1 MODIFY vc TEXT;
+INSERT INTO t1 VALUES(3,1,'Testing MySQL databases is a cool ',
+'Must make it bug free for the customer',
+654321.4321,15.21,0,1965,"1905-11-14");
+INSERT INTO t1 VALUES(20,1,'Testing MySQL databases is a cool ',
+'Must make it bug free for the customer',
+654321.4321,15.21,0,1965,"1965-11-14");
+INSERT INTO t1 VALUES(50,1,'Testing MySQL databases is a cool ',
+'Must make it bug free for the customer',
+654321.4321,15.21,0,1965,"1985-11-14");
+--- Add columns on slave ---
+ALTER TABLE t1 ADD (u int, v char(16) default 'default');
+UPDATE t1 SET u=7 WHERE id < 50;
+UPDATE t1 SET v='explicit' WHERE id >10;
+--- Show changed table on slave ---
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `id` mediumint(9) NOT NULL,
+  `b1` int(11) DEFAULT NULL,
+  `vc` text,
+  `bc` char(255) DEFAULT NULL,
+  `d` decimal(10,4) DEFAULT '0.0000',
+  `f` float DEFAULT '0',
+  `total` bigint(20) unsigned NOT NULL DEFAULT '0',
+  `y` year(4) DEFAULT NULL,
+  `t` date DEFAULT NULL,
+  `u` int(11) DEFAULT NULL,
+  `v` char(16) DEFAULT 'default',
+  PRIMARY KEY (`id`,`total`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT * 
+FROM t1
+ORDER BY id;
+id	b1	vc	bc	d	f	total	y	t	u	v
+3	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14	7	default
+20	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14	7	explicit
+50	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14	NULL	explicit
+STOP SLAVE;
+RESET SLAVE;
+RESET MASTER;
+START SLAVE;
+--- Populate t1 with data ---
+--- Select from t1 on master --- 
+select *
+from t1 
+order by id;
+id	b1	vc	bc	d	f	total	y	t
+2	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14
+3	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14
+4	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14
+20	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14
+42	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14
+50	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14
+142	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1995-11-14
+412	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	2005-11-14
+--- Select from t1 on slave ---
+select *
+from t1 
+order by id;
+id	b1	vc	bc	d	f	total	y	t	u	v
+2	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14	NULL	default
+3	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14	7	default
+4	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14	NULL	default
+20	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14	7	explicit
+42	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14	NULL	default
+50	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14	NULL	explicit
+142	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1995-11-14	NULL	default
+412	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	2005-11-14	NULL	default
+--- Perform basic operation on master ---
+--- and ensure replicated correctly ---
+--- Update t1 on master --
+UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" 
+WHERE id < 100 
+ORDER BY id;
+--- Check the update on master --- 
+SELECT *
+FROM t1 
+WHERE id < 100
+ORDER BY id;
+id	b1	vc	bc	d	f	total	y	t
+2	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+3	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+4	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+20	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+42	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+50	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+--- Check Update on slave ---
+SELECT *
+FROM t1 
+WHERE id < 100
+ORDER BY id;
+id	b1	vc	bc	d	f	total	y	t	u	v
+2	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22	NULL	default
+3	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22	7	default
+4	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22	NULL	default
+20	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22	7	explicit
+42	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22	NULL	default
+50	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22	NULL	explicit
+--- Remove a record from t1 on master ---
+DELETE FROM t1 WHERE id = 412;
+--- Show current count on master for t1 ---
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+7
+--- Show current count on slave for t1 --- 
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+7
+TRUNCATE TABLE t1;
+TRUNCATE TABLE t1;
+--- Check that replication works when master has more columns than slave
+--- Remove columns on slave ---
+ALTER TABLE t1 DROP COLUMN v;
+ALTER TABLE t1 DROP COLUMN u;
+ALTER TABLE t1 DROP COLUMN t;
+ALTER TABLE t1 DROP COLUMN y;
+--- Show changed table on slave ---
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `id` mediumint(9) NOT NULL,
+  `b1` int(11) DEFAULT NULL,
+  `vc` text,
+  `bc` char(255) DEFAULT NULL,
+  `d` decimal(10,4) DEFAULT '0.0000',
+  `f` float DEFAULT '0',
+  `total` bigint(20) unsigned NOT NULL DEFAULT '0',
+  PRIMARY KEY (`id`,`total`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+STOP SLAVE;
+RESET SLAVE;
+RESET MASTER;
+START SLAVE;
+--- Populate t1 with data ---
+--- Select from t1 on master --- 
+select *
+from t1 
+order by id;
+id	b1	vc	bc	d	f	total	y	t
+2	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14
+4	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14
+42	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14
+142	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1995-11-14
+412	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	2005-11-14
+--- Select from t1 on slave ---
+select *
+from t1 
+order by id;
+id	b1	vc	bc	d	f	total
+2	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0
+4	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0
+42	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0
+142	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0
+412	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0
+--- Perform basic operation on master ---
+--- and ensure replicated correctly ---
+--- Update t1 on master --
+UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" 
+WHERE id < 100 
+ORDER BY id;
+--- Check the update on master --- 
+SELECT *
+FROM t1 
+WHERE id < 100
+ORDER BY id;
+id	b1	vc	bc	d	f	total	y	t
+2	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+4	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+42	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+--- Check Update on slave ---
+SELECT *
+FROM t1 
+WHERE id < 100
+ORDER BY id;
+id	b1	vc	bc	d	f	total
+2	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0
+4	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0
+42	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0
+--- Remove a record from t1 on master ---
+DELETE FROM t1 WHERE id = 412;
+--- Show current count on master for t1 ---
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+4
+--- Show current count on slave for t1 --- 
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+4
+TRUNCATE TABLE t1;
+TRUNCATE TABLE t1;
+--- Do Cleanup --
+DROP TABLE IF EXISTS t1;
+
+=== NDB -> NDB ===
+
+SET storage_engine=ndb;
+--- Doing pre test cleanup --- 
+DROP TABLE IF EXISTS t1;
+--- Create Table Section ---
+CREATE TABLE t1 (id MEDIUMINT NOT NULL, 
+b1 INT, vc VARCHAR(255), 
+bc CHAR(255), 
+d DECIMAL(10,4) DEFAULT 0, 
+f FLOAT DEFAULT 0, 
+total BIGINT UNSIGNED, 
+y YEAR, 
+t DATE, 
+PRIMARY KEY(id));
+--- Show table on master ---
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `id` mediumint(9) NOT NULL,
+  `b1` int(11) DEFAULT NULL,
+  `vc` varchar(255) DEFAULT NULL,
+  `bc` char(255) DEFAULT NULL,
+  `d` decimal(10,4) DEFAULT '0.0000',
+  `f` float DEFAULT '0',
+  `total` bigint(20) unsigned DEFAULT NULL,
+  `y` year(4) DEFAULT NULL,
+  `t` date DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1
+--- Show table on slave ---
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `id` mediumint(9) NOT NULL,
+  `b1` int(11) DEFAULT NULL,
+  `vc` varchar(255) DEFAULT NULL,
+  `bc` char(255) DEFAULT NULL,
+  `d` decimal(10,4) DEFAULT '0.0000',
+  `f` float DEFAULT '0',
+  `total` bigint(20) unsigned DEFAULT NULL,
+  `y` year(4) DEFAULT NULL,
+  `t` date DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+STOP SLAVE;
+RESET SLAVE;
+RESET MASTER;
+START SLAVE;
+--- Populate t1 with data ---
+--- Select from t1 on master --- 
+select *
+from t1 
+order by id;
+id	b1	vc	bc	d	f	total	y	t
+2	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14
+4	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14
+42	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14
+142	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1995-11-14
+412	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	2005-11-14
+--- Select from t1 on slave ---
+select *
+from t1 
+order by id;
+id	b1	vc	bc	d	f	total	y	t
+2	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14
+4	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14
+42	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14
+142	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1995-11-14
+412	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	2005-11-14
+--- Perform basic operation on master ---
+--- and ensure replicated correctly ---
+--- Update t1 on master --
+UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" 
+WHERE id < 100 
+ORDER BY id;
+--- Check the update on master --- 
+SELECT *
+FROM t1 
+WHERE id < 100
+ORDER BY id;
+id	b1	vc	bc	d	f	total	y	t
+2	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+4	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+42	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+--- Check Update on slave ---
+SELECT *
+FROM t1 
+WHERE id < 100
+ORDER BY id;
+id	b1	vc	bc	d	f	total	y	t
+2	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+4	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+42	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+--- Remove a record from t1 on master ---
+DELETE FROM t1 WHERE id = 412;
+--- Show current count on master for t1 ---
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+4
+--- Show current count on slave for t1 --- 
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+4
+TRUNCATE TABLE t1;
+--- Check that simple Alter statements are replicated correctly --
+ALTER TABLE t1 DROP PRIMARY KEY;
+ALTER TABLE t1 MODIFY vc char(32);
+--- Show the new improved table on the master ---
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `id` mediumint(9) NOT NULL,
+  `b1` int(11) DEFAULT NULL,
+  `vc` char(32) DEFAULT NULL,
+  `bc` char(255) DEFAULT NULL,
+  `d` decimal(10,4) DEFAULT '0.0000',
+  `f` float DEFAULT '0',
+  `total` bigint(20) unsigned DEFAULT NULL,
+  `y` year(4) DEFAULT NULL,
+  `t` date DEFAULT NULL
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1
+--- Make sure that our tables on slave are still same engine ---
+--- and that the alter statements replicated correctly ---
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `id` mediumint(9) NOT NULL,
+  `b1` int(11) DEFAULT NULL,
+  `vc` char(32) DEFAULT NULL,
+  `bc` char(255) DEFAULT NULL,
+  `d` decimal(10,4) DEFAULT '0.0000',
+  `f` float DEFAULT '0',
+  `total` bigint(20) unsigned DEFAULT NULL,
+  `y` year(4) DEFAULT NULL,
+  `t` date DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+STOP SLAVE;
+RESET SLAVE;
+RESET MASTER;
+START SLAVE;
+--- Populate t1 with data ---
+--- Select from t1 on master --- 
+select *
+from t1 
+order by id;
+id	b1	vc	bc	d	f	total	y	t
+2	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14
+4	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14
+42	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14
+142	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	1995-11-14
+412	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	2005-11-14
+--- Select from t1 on slave ---
+select *
+from t1 
+order by id;
+id	b1	vc	bc	d	f	total	y	t
+2	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14
+4	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14
+42	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14
+142	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	1995-11-14
+412	1	Testing MySQL databases is a coo	Must make it bug free for the customer	654321.4321	15.21	0	1965	2005-11-14
+--- Perform basic operation on master ---
+--- and ensure replicated correctly ---
+--- Update t1 on master --
+UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" 
+WHERE id < 100 
+ORDER BY id;
+--- Check the update on master --- 
+SELECT *
+FROM t1 
+WHERE id < 100
+ORDER BY id;
+id	b1	vc	bc	d	f	total	y	t
+2	0	Testing MySQL databases is a coo	updated	654321.4321	15.21	0	1965	2006-02-22
+4	0	Testing MySQL databases is a coo	updated	654321.4321	15.21	0	1965	2006-02-22
+42	0	Testing MySQL databases is a coo	updated	654321.4321	15.21	0	1965	2006-02-22
+--- Check Update on slave ---
+SELECT *
+FROM t1 
+WHERE id < 100
+ORDER BY id;
+id	b1	vc	bc	d	f	total	y	t
+2	0	Testing MySQL databases is a coo	updated	654321.4321	15.21	0	1965	2006-02-22
+4	0	Testing MySQL databases is a coo	updated	654321.4321	15.21	0	1965	2006-02-22
+42	0	Testing MySQL databases is a coo	updated	654321.4321	15.21	0	1965	2006-02-22
+--- Remove a record from t1 on master ---
+DELETE FROM t1 WHERE id = 412;
+--- Show current count on master for t1 ---
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+4
+--- Show current count on slave for t1 --- 
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+4
+TRUNCATE TABLE t1;
+--- Check that replication works when slave has more columns than master
+ALTER TABLE t1 ADD PRIMARY KEY(id,total);
+ALTER TABLE t1 MODIFY vc TEXT;
+INSERT INTO t1 VALUES(3,1,'Testing MySQL databases is a cool ',
+'Must make it bug free for the customer',
+654321.4321,15.21,0,1965,"1905-11-14");
+INSERT INTO t1 VALUES(20,1,'Testing MySQL databases is a cool ',
+'Must make it bug free for the customer',
+654321.4321,15.21,0,1965,"1965-11-14");
+INSERT INTO t1 VALUES(50,1,'Testing MySQL databases is a cool ',
+'Must make it bug free for the customer',
+654321.4321,15.21,0,1965,"1985-11-14");
+--- Add columns on slave ---
+ALTER TABLE t1 ADD (u int, v char(16) default 'default');
+UPDATE t1 SET u=7 WHERE id < 50;
+UPDATE t1 SET v='explicit' WHERE id >10;
+--- Show changed table on slave ---
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `id` mediumint(9) NOT NULL,
+  `b1` int(11) DEFAULT NULL,
+  `vc` text,
+  `bc` char(255) DEFAULT NULL,
+  `d` decimal(10,4) DEFAULT '0.0000',
+  `f` float DEFAULT '0',
+  `total` bigint(20) unsigned NOT NULL DEFAULT '0',
+  `y` year(4) DEFAULT NULL,
+  `t` date DEFAULT NULL,
+  `u` int(11) DEFAULT NULL,
+  `v` char(16) DEFAULT 'default',
+  PRIMARY KEY (`id`,`total`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT * 
+FROM t1
+ORDER BY id;
+id	b1	vc	bc	d	f	total	y	t	u	v
+3	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14	7	default
+20	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14	7	explicit
+50	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14	NULL	explicit
+STOP SLAVE;
+RESET SLAVE;
+RESET MASTER;
+START SLAVE;
+--- Populate t1 with data ---
+--- Select from t1 on master --- 
+select *
+from t1 
+order by id;
+id	b1	vc	bc	d	f	total	y	t
+2	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14
+3	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14
+4	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14
+20	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14
+42	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14
+50	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14
+142	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1995-11-14
+412	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	2005-11-14
+--- Select from t1 on slave ---
+select *
+from t1 
+order by id;
+id	b1	vc	bc	d	f	total	y	t	u	v
+2	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14	NULL	default
+3	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14	7	default
+4	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14	NULL	default
+20	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14	7	explicit
+42	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14	NULL	default
+50	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14	NULL	explicit
+142	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1995-11-14	NULL	default
+412	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	2005-11-14	NULL	default
+--- Perform basic operation on master ---
+--- and ensure replicated correctly ---
+--- Update t1 on master --
+UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" 
+WHERE id < 100 
+ORDER BY id;
+--- Check the update on master --- 
+SELECT *
+FROM t1 
+WHERE id < 100
+ORDER BY id;
+id	b1	vc	bc	d	f	total	y	t
+2	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+3	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+4	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+20	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+42	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+50	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+--- Check Update on slave ---
+SELECT *
+FROM t1 
+WHERE id < 100
+ORDER BY id;
+id	b1	vc	bc	d	f	total	y	t	u	v
+2	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22	NULL	default
+3	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22	7	default
+4	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22	NULL	default
+20	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22	7	explicit
+42	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22	NULL	default
+50	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22	NULL	explicit
+--- Remove a record from t1 on master ---
+DELETE FROM t1 WHERE id = 412;
+--- Show current count on master for t1 ---
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+7
+--- Show current count on slave for t1 --- 
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+7
+TRUNCATE TABLE t1;
+TRUNCATE TABLE t1;
+--- Check that replication works when master has more columns than slave
+--- Remove columns on slave ---
+ALTER TABLE t1 DROP COLUMN v;
+ALTER TABLE t1 DROP COLUMN u;
+ALTER TABLE t1 DROP COLUMN t;
+ALTER TABLE t1 DROP COLUMN y;
+--- Show changed table on slave ---
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `id` mediumint(9) NOT NULL,
+  `b1` int(11) DEFAULT NULL,
+  `vc` text,
+  `bc` char(255) DEFAULT NULL,
+  `d` decimal(10,4) DEFAULT '0.0000',
+  `f` float DEFAULT '0',
+  `total` bigint(20) unsigned NOT NULL DEFAULT '0',
+  PRIMARY KEY (`id`,`total`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+STOP SLAVE;
+RESET SLAVE;
+RESET MASTER;
+START SLAVE;
+--- Populate t1 with data ---
+--- Select from t1 on master --- 
+select *
+from t1 
+order by id;
+id	b1	vc	bc	d	f	total	y	t
+2	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1965-11-14
+4	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1985-11-14
+42	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1905-11-14
+142	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	1995-11-14
+412	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0	1965	2005-11-14
+--- Select from t1 on slave ---
+select *
+from t1 
+order by id;
+id	b1	vc	bc	d	f	total
+2	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0
+4	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0
+42	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0
+142	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0
+412	1	Testing MySQL databases is a cool 	Must make it bug free for the customer	654321.4321	15.21	0
+--- Perform basic operation on master ---
+--- and ensure replicated correctly ---
+--- Update t1 on master --
+UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" 
+WHERE id < 100 
+ORDER BY id;
+--- Check the update on master --- 
+SELECT *
+FROM t1 
+WHERE id < 100
+ORDER BY id;
+id	b1	vc	bc	d	f	total	y	t
+2	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+4	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+42	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0	1965	2006-02-22
+--- Check Update on slave ---
+SELECT *
+FROM t1 
+WHERE id < 100
+ORDER BY id;
+id	b1	vc	bc	d	f	total
+2	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0
+4	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0
+42	0	Testing MySQL databases is a cool 	updated	654321.4321	15.21	0
+--- Remove a record from t1 on master ---
+DELETE FROM t1 WHERE id = 412;
+--- Show current count on master for t1 ---
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+4
+--- Show current count on slave for t1 --- 
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+4
+TRUNCATE TABLE t1;
+TRUNCATE TABLE t1;
+--- Do Cleanup --
+DROP TABLE IF EXISTS t1;
diff -Nrup a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other-slave.opt
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other-slave.opt	2007-08-25 13:16:39 +02:00
@@ -0,0 +1 @@
+--innodb --log-slave-updates=0 
diff -Nrup a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test	2007-08-25 13:16:39 +02:00
@@ -0,0 +1,34 @@
+#############################################################
+# Author: Rafal Somla
+# Date: 2006-08-20
+# Purpose: Trying to test ability to replicate from cluster
+# to other engines (innodb, myisam).
+##############################################################
+--source include/have_ndb.inc
+--source include/have_innodb.inc
+--source include/master-slave.inc
+
+# On master use NDB as storage engine.
+connection master;
+SET storage_engine=ndb;
+
+--echo
+--echo === NDB -> MYISAM ===
+--echo
+connection slave;
+SET storage_engine=myisam;
+--source extra/rpl_tests/rpl_ndb_2multi_basic.test
+
+--echo
+--echo === NDB -> INNODB ===
+--echo
+connection slave;
+SET storage_engine=innodb;
+--source extra/rpl_tests/rpl_ndb_2multi_basic.test
+
+--echo
+--echo === NDB -> NDB ===
+--echo
+connection slave;
+SET storage_engine=ndb;
+--source extra/rpl_tests/rpl_ndb_2multi_basic.test
Thread
bk commit into 5.1 tree (rafal:1.2571) BUG#21842rsomla25 Aug
  • Re: bk commit into 5.1 tree (rafal:1.2571) BUG#21842Andrei Elkin27 Aug
    • Re: bk commit into 5.1 tree (rafal:1.2571) BUG#21842Rafal Somla27 Aug