[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.137.216.77: ~ $
include/master-slave.inc
[connection master]
SET default_storage_engine=ndb;

=== NDB -> MYISAM ===

[connection slave]
set @old_slave_exec_mode= @@global.slave_exec_mode;
set @@global.slave_exec_mode= 'IDEMPOTENT';
CREATE TABLE mysql.ndb_apply_status
( server_id INT UNSIGNED NOT NULL,
epoch BIGINT UNSIGNED NOT NULL,
log_name VARCHAR(255) BINARY NOT NULL,
start_pos BIGINT UNSIGNED NOT NULL,
end_pos BIGINT UNSIGNED NOT NULL,
PRIMARY KEY USING HASH (server_id)) ENGINE=MYISAM;
SET @old_slave_storage_engine=@@global.default_storage_engine;
SET @@global.default_storage_engine=myisam;
include/start_slave.inc
--- 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;
[connection slave]
include/stop_slave.inc

=== NDB -> INNODB ===

[connection slave]
alter table mysql.ndb_apply_status engine=innodb;
SET @@global.default_storage_engine=innodb;
include/start_slave.inc
--- 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=InnoDB 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=InnoDB 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=InnoDB 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=InnoDB 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;
[connection slave]
include/stop_slave.inc
[connection slave]
drop table mysql.ndb_apply_status;
set @@global.slave_exec_mode= @old_slave_exec_mode;
SET @@global.default_storage_engine=@old_slave_storage_engine;

Filemanager

Name Type Size Permission Actions
ndb_rpl_2innodb.result File 41.21 KB 0644
ndb_rpl_2myisam.result File 41.21 KB 0644
ndb_rpl_2ndb.result File 15.83 KB 0644
ndb_rpl_2other.result File 32.39 KB 0644
ndb_rpl_add_column.result File 5.55 KB 0644
ndb_rpl_apply_status.result File 529 B 0644
ndb_rpl_auto_inc.result File 3.18 KB 0644
ndb_rpl_bank.result File 10.82 KB 0644
ndb_rpl_basic.result File 13.07 KB 0644
ndb_rpl_binlog_format_errors.result File 920 B 0644
ndb_rpl_bitfield.result File 14.11 KB 0644
ndb_rpl_blob.result File 6.92 KB 0644
ndb_rpl_break_3_chain.result File 2.25 KB 0644
ndb_rpl_bug22045.result File 2.19 KB 0644
ndb_rpl_check_for_mixed.result File 105 B 0644
ndb_rpl_circular.result File 5.18 KB 0644
ndb_rpl_circular_2ch.result File 1.53 KB 0644
ndb_rpl_circular_2ch_rep_status.result File 4.69 KB 0644
ndb_rpl_circular_simplex.result File 559 B 0644
ndb_rpl_conflict.result File 9.76 KB 0644
ndb_rpl_conflict_epoch.result File 107.75 KB 0644
ndb_rpl_conflict_max.result File 49.57 KB 0644
ndb_rpl_conflict_max_delete_win.result File 49.51 KB 0644
ndb_rpl_conflict_old.result File 49.75 KB 0644
ndb_rpl_ctype_ucs2_def.result File 703 B 0644
ndb_rpl_dd_advance.result File 8.54 KB 0644
ndb_rpl_dd_basic.result File 2.04 KB 0644
ndb_rpl_dd_partitions.result File 35.55 KB 0644
ndb_rpl_do_db.result File 1.07 KB 0644
ndb_rpl_do_table.result File 784 B 0644
ndb_rpl_empty_epoch.result File 817 B 0644
ndb_rpl_gap_event.result File 785 B 0644
ndb_rpl_idempotent.result File 1.49 KB 0644
ndb_rpl_ignore_db.result File 732 B 0644
ndb_rpl_init_rep_status.result File 2.49 KB 0644
ndb_rpl_innodb2ndb.result File 40.87 KB 0644
ndb_rpl_innodb_trans.result File 2.71 KB 0644
ndb_rpl_load.result File 1.27 KB 0644
ndb_rpl_logging.result File 2.29 KB 0644
ndb_rpl_mix_eng_trans.result File 10.14 KB 0644
ndb_rpl_mix_innodb.result File 3.98 KB 0644
ndb_rpl_mixed_tables.result File 6.91 KB 0644
ndb_rpl_multi.result File 1.7 KB 0644
ndb_rpl_myisam2ndb.result File 40.86 KB 0644
ndb_rpl_ndbapi_multi.result File 201 B 0644
ndb_rpl_rep_error.result File 1.69 KB 0644
ndb_rpl_rep_ignore.result File 1.03 KB 0644
ndb_rpl_skip_gap_event.result File 666 B 0644
ndb_rpl_slave_lsu.result File 53.81 KB 0644
ndb_rpl_slave_lsu_anyval.result File 54.73 KB 0644
ndb_rpl_slave_restart.result File 1.76 KB 0644
ndb_rpl_stm_innodb.result File 4.01 KB 0644
ndb_rpl_sync.result File 1.99 KB 0644
ndb_rpl_ui.result File 709 B 0644
ndb_rpl_ui2.result File 435 B 0644
ndb_rpl_ui3.result File 874 B 0644
rpl_truncate_7ndb.result File 2.91 KB 0644
rpl_truncate_7ndb_2.result File 2.91 KB 0644