438
438
set @@global.slave_exec_mode= default;
441
441
SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
443
**** Test for BUG#37076 ****
445
DROP TABLE IF EXISTS t1;
446
CREATE TABLE t1 (a TIMESTAMP, b DATETIME, c DATE);
447
INSERT INTO t1 VALUES(
448
'2005-11-14 01:01:01', '2005-11-14 01:01:02', '2005-11-14');
452
2005-11-14 01:01:01 2005-11-14 01:01:02 2005-11-14
443
453
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8;
454
CREATE TABLE t1 (i INT NOT NULL,
455
c CHAR(16) CHARACTER SET utf8 NOT NULL,
457
CREATE TABLE t2 (i INT NOT NULL,
458
c CHAR(16) CHARACTER SET utf8 NOT NULL,
460
ALTER TABLE t2 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL;
461
CREATE TABLE t3 (i INT NOT NULL,
462
c CHAR(128) CHARACTER SET utf8 NOT NULL,
464
ALTER TABLE t3 MODIFY c CHAR(16) CHARACTER SET utf8 NOT NULL;
465
CREATE TABLE t4 (i INT NOT NULL,
466
c CHAR(128) CHARACTER SET utf8 NOT NULL,
468
CREATE TABLE t5 (i INT NOT NULL,
469
c CHAR(255) CHARACTER SET utf8 NOT NULL,
471
ALTER TABLE t5 MODIFY c CHAR(16) CHARACTER SET utf8 NOT NULL;
472
CREATE TABLE t6 (i INT NOT NULL,
473
c CHAR(255) CHARACTER SET utf8 NOT NULL,
475
ALTER TABLE t6 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL;
476
CREATE TABLE t7 (i INT NOT NULL,
477
c CHAR(255) CHARACTER SET utf8 NOT NULL,
479
[expecting slave to replicate correctly]
480
INSERT INTO t1 VALUES (1, "", 1);
481
INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2);
482
Comparing tables master:test.t1 and slave:test.t1
483
[expecting slave to replicate correctly]
484
INSERT INTO t2 VALUES (1, "", 1);
485
INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2);
486
Comparing tables master:test.t2 and slave:test.t2
487
[expecting slave to stop]
488
INSERT INTO t3 VALUES (1, "", 1);
489
INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2);
491
Table definition on master and slave does not match: Column 1 size mismatch - master has size 512, test.t3 on slave has size 65. Master's column size should be <= the slave's column size.
492
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=8;
494
[expecting slave to replicate correctly]
495
INSERT INTO t4 VALUES (1, "", 1);
496
INSERT INTO t4 VALUES (2, repeat(_utf8'a', 128), 2);
497
Comparing tables master:test.t4 and slave:test.t4
498
[expecting slave to stop]
499
INSERT INTO t5 VALUES (1, "", 1);
500
INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
502
Table definition on master and slave does not match: Column 1 size mismatch - master has size 1020, test.t5 on slave has size 65. Master's column size should be <= the slave's column size.
503
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=8;
505
[expecting slave to stop]
506
INSERT INTO t6 VALUES (1, "", 1);
507
INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
509
Table definition on master and slave does not match: Column 1 size mismatch - master has size 1020, test.t6 on slave has size 513. Master's column size should be <= the slave's column size.
510
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=8;
512
[expecting slave to replicate correctly]
513
INSERT INTO t7 VALUES (1, "", 1);
514
INSERT INTO t7 VALUES (2, repeat(_utf8'a', 255), 2);
515
Comparing tables master:test.t7 and slave:test.t7
516
drop table t1, t2, t3, t4, t5, t6, t7;