Commit f1cdbe0d authored by unknown's avatar unknown

Merge mysql.com:/usr/clones/mysql-5.1-new-rpl

into  mysql.com:/usr/clones/rpl-push


mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test:
  Auto merged
mysql-test/suite/rpl/r/rpl_extraCol_innodb.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_extraCol_myisam.result:
  Auto merged
mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result:
  Auto merged
parents e70e5326 42886677
......@@ -10,7 +10,7 @@
########### Clean up ################
--disable_warnings
--disable_query_log
DROP TABLE IF EXISTS t1, t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17;
DROP TABLE IF EXISTS t1, t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t14a,t15,t16,t17;
--enable_query_log
--enable_warnings
......@@ -662,6 +662,68 @@ sync_slave_with_master;
--replace_column 7 CURRENT_TIMESTAMP
SELECT * FROM t14 ORDER BY c1;
####################################################
# - Alter Master drop column at end of table #
# Expect: column dropped #
####################################################
--echo *** Create t14a on slave ***
STOP SLAVE;
RESET SLAVE;
eval CREATE TABLE t14a (c1 INT KEY, c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
)ENGINE=$engine_type;
--echo *** Create t14a on Master ***
connection master;
eval CREATE TABLE t14a (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE=$engine_type;
RESET MASTER;
--echo *** Start Slave ***
connection slave;
START SLAVE;
--echo *** Master Data Insert ***
connection master;
set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1);
INSERT INTO t14a () VALUES(1,@b1,'Kyle'),
(2,@b1,'JOE'),
(3,@b1,'QA');
SELECT * FROM t14a ORDER BY c1;
--echo *** Select on Slave ****
sync_slave_with_master;
--replace_column 5 CURRENT_TIMESTAMP
SELECT * FROM t14a ORDER BY c1;
STOP SLAVE;
RESET SLAVE;
--echo *** Master Drop c5 ***
connection master;
ALTER TABLE t14a DROP COLUMN c5;
RESET MASTER;
--echo *** Start Slave ***
connection slave;
START SLAVE;
--echo *** Master Data Insert ***
connection master;
set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1);
INSERT INTO t14a () VALUES(4,@b1),
(5,@b1),
(6,@b1);
SELECT * FROM t14a ORDER BY c1;
--echo *** Select on Slave ****
sync_slave_with_master;
--replace_column 5 CURRENT_TIMESTAMP
SELECT * FROM t14a ORDER BY c1;
####################################################
# - Alter Master Dropping columns from the middle. #
......@@ -858,7 +920,7 @@ sync_slave_with_master;
#### Clean Up ####
--disable_warnings
--disable_query_log
DROP TABLE IF EXISTS t1, t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17;
DROP TABLE IF EXISTS t1, t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t14a,t15,t16,t17;
--enable_query_log
--enable_warnings
......
......@@ -615,6 +615,66 @@ c1 c2 c3 c4 c5 c6 c7
1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
*** Create t14a on slave ***
STOP SLAVE;
RESET SLAVE;
CREATE TABLE t14a (c1 INT KEY, c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
)ENGINE='InnoDB';
*** Create t14a on Master ***
CREATE TABLE t14a (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='InnoDB';
RESET MASTER;
*** Start Slave ***
START SLAVE;
*** Master Data Insert ***
set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1);
INSERT INTO t14a () VALUES(1,@b1,'Kyle'),
(2,@b1,'JOE'),
(3,@b1,'QA');
SELECT * FROM t14a ORDER BY c1;
c1 c4 c5
1 b1b1b1b1b1b1b1b1 Kyle
2 b1b1b1b1b1b1b1b1 JOE
3 b1b1b1b1b1b1b1b1 QA
*** Select on Slave ****
SELECT * FROM t14a ORDER BY c1;
c1 c4 c5 c6 c7
1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
STOP SLAVE;
RESET SLAVE;
*** Master Drop c5 ***
ALTER TABLE t14a DROP COLUMN c5;
RESET MASTER;
*** Start Slave ***
START SLAVE;
*** Master Data Insert ***
set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1);
INSERT INTO t14a () VALUES(4,@b1),
(5,@b1),
(6,@b1);
SELECT * FROM t14a ORDER BY c1;
c1 c4
1 b1b1b1b1b1b1b1b1
2 b1b1b1b1b1b1b1b1
3 b1b1b1b1b1b1b1b1
4 b1b1b1b1b1b1b1b1
5 b1b1b1b1b1b1b1b1
6 b1b1b1b1b1b1b1b1
*** Select on Slave ****
SELECT * FROM t14a ORDER BY c1;
c1 c4 c5 c6 c7
1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
4 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
5 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
6 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
*** connect to master and drop columns ***
ALTER TABLE t14 DROP COLUMN c2;
ALTER TABLE t14 DROP COLUMN c4;
......
......@@ -615,6 +615,66 @@ c1 c2 c3 c4 c5 c6 c7
1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
*** Create t14a on slave ***
STOP SLAVE;
RESET SLAVE;
CREATE TABLE t14a (c1 INT KEY, c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
)ENGINE='MyISAM';
*** Create t14a on Master ***
CREATE TABLE t14a (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='MyISAM';
RESET MASTER;
*** Start Slave ***
START SLAVE;
*** Master Data Insert ***
set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1);
INSERT INTO t14a () VALUES(1,@b1,'Kyle'),
(2,@b1,'JOE'),
(3,@b1,'QA');
SELECT * FROM t14a ORDER BY c1;
c1 c4 c5
1 b1b1b1b1b1b1b1b1 Kyle
2 b1b1b1b1b1b1b1b1 JOE
3 b1b1b1b1b1b1b1b1 QA
*** Select on Slave ****
SELECT * FROM t14a ORDER BY c1;
c1 c4 c5 c6 c7
1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
STOP SLAVE;
RESET SLAVE;
*** Master Drop c5 ***
ALTER TABLE t14a DROP COLUMN c5;
RESET MASTER;
*** Start Slave ***
START SLAVE;
*** Master Data Insert ***
set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1);
INSERT INTO t14a () VALUES(4,@b1),
(5,@b1),
(6,@b1);
SELECT * FROM t14a ORDER BY c1;
c1 c4
1 b1b1b1b1b1b1b1b1
2 b1b1b1b1b1b1b1b1
3 b1b1b1b1b1b1b1b1
4 b1b1b1b1b1b1b1b1
5 b1b1b1b1b1b1b1b1
6 b1b1b1b1b1b1b1b1
*** Select on Slave ****
SELECT * FROM t14a ORDER BY c1;
c1 c4 c5 c6 c7
1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
4 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
5 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
6 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
*** connect to master and drop columns ***
ALTER TABLE t14 DROP COLUMN c2;
ALTER TABLE t14 DROP COLUMN c4;
......
......@@ -615,6 +615,66 @@ c1 c2 c3 c4 c5 c6 c7
1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle NULL CURRENT_TIMESTAMP
2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE NULL CURRENT_TIMESTAMP
3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA NULL CURRENT_TIMESTAMP
*** Create t14a on slave ***
STOP SLAVE;
RESET SLAVE;
CREATE TABLE t14a (c1 INT KEY, c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
)ENGINE='NDB';
*** Create t14a on Master ***
CREATE TABLE t14a (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='NDB';
RESET MASTER;
*** Start Slave ***
START SLAVE;
*** Master Data Insert ***
set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1);
INSERT INTO t14a () VALUES(1,@b1,'Kyle'),
(2,@b1,'JOE'),
(3,@b1,'QA');
SELECT * FROM t14a ORDER BY c1;
c1 c4 c5
1 b1b1b1b1b1b1b1b1 Kyle
2 b1b1b1b1b1b1b1b1 JOE
3 b1b1b1b1b1b1b1b1 QA
*** Select on Slave ****
SELECT * FROM t14a ORDER BY c1;
c1 c4 c5 c6 c7
1 b1b1b1b1b1b1b1b1 Kyle NULL CURRENT_TIMESTAMP
2 b1b1b1b1b1b1b1b1 JOE NULL CURRENT_TIMESTAMP
3 b1b1b1b1b1b1b1b1 QA NULL CURRENT_TIMESTAMP
STOP SLAVE;
RESET SLAVE;
*** Master Drop c5 ***
ALTER TABLE t14a DROP COLUMN c5;
RESET MASTER;
*** Start Slave ***
START SLAVE;
*** Master Data Insert ***
set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1);
INSERT INTO t14a () VALUES(4,@b1),
(5,@b1),
(6,@b1);
SELECT * FROM t14a ORDER BY c1;
c1 c4
1 b1b1b1b1b1b1b1b1
2 b1b1b1b1b1b1b1b1
3 b1b1b1b1b1b1b1b1
4 b1b1b1b1b1b1b1b1
5 b1b1b1b1b1b1b1b1
6 b1b1b1b1b1b1b1b1
*** Select on Slave ****
SELECT * FROM t14a ORDER BY c1;
c1 c4 c5 c6 c7
1 b1b1b1b1b1b1b1b1 Kyle NULL CURRENT_TIMESTAMP
2 b1b1b1b1b1b1b1b1 JOE NULL CURRENT_TIMESTAMP
3 b1b1b1b1b1b1b1b1 QA NULL CURRENT_TIMESTAMP
4 b1b1b1b1b1b1b1b1 NULL NULL CURRENT_TIMESTAMP
5 b1b1b1b1b1b1b1b1 NULL NULL CURRENT_TIMESTAMP
6 b1b1b1b1b1b1b1b1 NULL NULL CURRENT_TIMESTAMP
*** connect to master and drop columns ***
ALTER TABLE t14 DROP COLUMN c2;
ALTER TABLE t14 DROP COLUMN c4;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment